import Vue from 'vue'
import Router from 'vue-router'
import All from './views/All.vue'
import Reader from './views/Reader.vue'
import Login from './views/Login.vue'
import History from './views/History.vue'

Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', redirect: '/login' },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/books',
      name: 'all',
      component: All
    },
    {
      path: '/reader/:id',
      name: 'reader',
      component: Reader
    },
    {
      path: '/history',
      name: 'history',
      component: History
    }
    
  ]
})
